﻿<UserControl x:Class="VrPlayer.Views.Settings.ShortcutsSettings"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:converters="clr-namespace:VrPlayer.Helpers.Converters;assembly=VrPlayer.Helpers"
             mc:Ignorable="d">
    <UserControl.Resources>
        <converters:ObjectToStringConverter x:Key="ObjectToString"/>
    </UserControl.Resources>
    <ScrollViewer VerticalScrollBarVisibility="Auto">
        <StackPanel Orientation="Vertical" Margin="16" CanVerticallyScroll="True">
            <Label Content="Shortcuts" FontSize="18" />
            <Border BorderBrush="Silver" BorderThickness="1" Height="1" Width="auto" Margin="0,0,0,24" />
            <!--Playback-->
            <TextBlock Text="Playback" FontWeight="Bold" Margin="0,0,0,8"></TextBlock>
            <Grid Margin="0,0,0,16">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Grid.Row="0" Content="Play/Pause:"></Label>
                <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Config.KeyPlayPause, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="0" Content="Stop:"></Label>
                <TextBox Grid.Column="4" Grid.Row="0" Text="{Binding Path=Config.KeyStop, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="0" Grid.Row="1" Content="Previous:"></Label>
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=Config.KeyPrevious, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="1" Content="Next:"></Label>
                <TextBox Grid.Column="4" Grid.Row="1" Text="{Binding Path=Config.KeyNext, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
            </Grid>
            <!--Navigation-->
            <TextBlock Text="Navigation" FontWeight="Bold" Margin="0,0,0,8"></TextBlock>
            <Grid Margin="0,0,0,16">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Grid.Row="0" Content="Move forward:"></Label>
                <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Config.KeyMoveForward, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="0" Content="Move backward:"></Label>
                <TextBox Grid.Column="4" Grid.Row="0" Text="{Binding Path=Config.KeyMoveBackward, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="0" Grid.Row="1" Content="Move left:"></Label>
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=Config.KeyMoveLeft, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="1" Content="Move right:"></Label>
                <TextBox Grid.Column="4" Grid.Row="1" Text="{Binding Path=Config.KeyMoveRight, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="0" Grid.Row="2" Content="Move up:"></Label>
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=Config.KeyMoveUp, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="2" Content="Move down:"></Label>
                <TextBox Grid.Column="4" Grid.Row="2" Text="{Binding Path=Config.KeyMoveDown, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
            </Grid>
            <!--Display-->
            <TextBlock Text="Display" FontWeight="Bold" Margin="0,0,0,8"></TextBlock>
            <Grid Margin="0,0,0,16">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Grid.Row="0" Content="Field of view (-):"></Label>
                <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Config.KeyFieldOfViewMinus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="0" Content="Field of view (+):"></Label>
                <TextBox Grid.Column="4" Grid.Row="0" Text="{Binding Path=Config.KeyFieldOfViewPlus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="0" Grid.Row="1" Content="Horizontal offset (-):"></Label>
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Path=Config.KeyHorizontalOffsetMinus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="1" Content="Horizontal Offset (+):"></Label>
                <TextBox Grid.Column="4" Grid.Row="1" Text="{Binding Path=Config.KeyHorizontalOffsetPlus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="0" Grid.Row="2" Content="Vertical Offset (-):"></Label>
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Path=Config.KeyVerticalOffsetMinus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="2" Content="Vertical Offset (+):"></Label>
                <TextBox Grid.Column="4" Grid.Row="2" Text="{Binding Path=Config.KeyVerticalOffsetPlus, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
            </Grid>
            <!--Trackers-->
            <TextBlock Text="Trackers" FontWeight="Bold" Margin="0,0,0,8"></TextBlock>
            <Grid Margin="0,0,0,16">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="125" />
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
                <Label Grid.Column="0" Grid.Row="0" Content="Calibrate:"></Label>
                <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Path=Config.KeyTrackerCalibrate, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
                <Label Grid.Column="3" Grid.Row="0" Content="Reset:"></Label>
                <TextBox Grid.Column="4" Grid.Row="0" Text="{Binding Path=Config.KeyTrackerReset, Converter={StaticResource ObjectToString}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="True" PreviewMouseDown="UIElement_OnPreviewMouseDown"></TextBox>
            </Grid>
        </StackPanel>
    </ScrollViewer>
</UserControl>
